﻿using System.Collections.Generic;
using System.ServiceModel;
using DemoLib.Shared.Contracts;
using DemoLib.Shared.Models;

namespace DemoLib.Service.Client.Clients
{
    public class InfoServiceClient : ClientBase<IInfoService>, IInfoService
    {
        public IEnumerable<News> GetNews(int top = 10)
        {
            return Channel.GetNews(top);
        }

        public UserTask InsertNews(News news)
        {
            return Channel.InsertNews(news);
        }

        public void UpdateNew(News news)
        {
            Channel.UpdateNew(news);
        }

        public void DeleteNews(int id)
        {
            Channel.DeleteNews(id);
        }

        public IEnumerable<UserTask> GetTasks(int top = 10)
        {
            return Channel.GetTasks(top);
        }

        public UserTask InsertTask(UserTask task)
        {
            return Channel.InsertTask(task);
        }

        public void UpdateTask(UserTask task)
        {
            Channel.UpdateTask(task);
        }

        public void DeleteTask(int id)
        {
            Channel.DeleteTask(id);
        }
    }
}
